﻿namespace Model.Entites
{
    /// <summary>
    /// 后台权限表
    ///</summary>
    [SugarTable("T_Permission")]
    public class TPermission : ModelBase
    {
        /// <summary>
        /// 权限名称
        ///</summary>
        public string AuthName { get; set; }

        /// <summary>
        /// 图标名
        ///</summary>
        [SugarColumn(IsNullable = true)]
        public string Icon { get; set; }

        /// <summary>
        /// 备注
        ///</summary>
        [SugarColumn(ColumnDataType = "LONGTEXT", IsNullable = true)]
        public string Remark { get; set; }

        /// <summary>
        /// 父权限ID
        /// </summary>
        public int FatherAuthId { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string EnName { get; set; }

        /// <summary>
        /// 导航--子权限
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(FatherAuthId))]
        public List<TPermission> Permissions { get; set; }
    }
}